package Homework06;

import java.util.List;
import java.util.stream.Collectors;

public class Homework07 {
    public static void main(String[] args) {
        String str1 = "ppRYYGrrYBR2258";
        String str2 = "YrR8RrY";

        List<Character> list1 = str1.chars().mapToObj(c -> (char)c).collect(Collectors.toList());
        List<Character> list2 = str2.chars().mapToObj(c -> (char)c).collect(Collectors.toList());

        list2.forEach(ch -> list1.removeIf(c -> c.equals(ch)));

        if (list1.size() == str1.length() - str2.length()) {
            System.out.println("Yes " + list1.size());
        } else {
            System.out.println("No");
        }
    }
}
